package com.derekandbritt.booST.data;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;
import javax.persistence.Column;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class EmotionLevel {

	@PrimaryKey
	@Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
	protected Long id;
	
	protected String userId;
	protected double level;
	protected Date timestamp;
	
	public EmotionLevel() {}
	
	public EmotionLevel(String userId, double level) {
		this.userId = userId;
		this.level = level;
		this.timestamp = new Date();
	}
	
	public Long getId() {
		return id;
	}
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(nullable=false)
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@Column(nullable=false)
	public double getLevel() {
		return level;
	}
	public void setLevel(double level) {
		this.level = level;
	}
	
	@Column(nullable=false)
	public Date getTimestamp() {
		return timestamp;
	}
	public void setTimestamp(Date timestamp) {
		this.timestamp = timestamp;
	}
}
